import { request } from '../utils/http-server';

export function getShopAddressByShopNo(data){
    return request({
        url: '/api/saleUserLogin/getShopAddressByShopNo',
        method: 'get',
        data
    })
}

export function findDefaultAddress(data){
    return request({
        url: '/api/milk/address/findDefaultAddress',
        method: 'get',
        data
    })
}

// export function findChildAddress(data){
//     return request({
//         url: '/api/milk/address/findChildAddress',
//         method: 'get',
//         data
//     })
// }

export function findChildAddress(data){
    return request({
        url: '/api/shopSaleAddress/shop-sale-address/findRegionByParentCode',
        method: 'get',
        data
    })
}

export function add(data){
    return request({
        url: '/api/saleUserLogin/modifyShopAddress',
        method: 'post',
        data
    })
}

export function deleteAddress(data){
    return request({
        url: '/api/milk/address/delete',
        method: 'post',
        data
    })
}

export function edit(data){
    return request({
        url: '/api/milk/address/edit',
        method: 'post',
        data
    })
}

export function setDefault(data){
    return request({
        url: '/api/milk/address/setDefault',
        method: 'post',
        data
    })
}





